<template>
  <div class="father-button">
      <div class="twobutton">
          <el-button @click="gotonew">新生成请假条</el-button>
          <el-button @click="gotohis">历史请假条</el-button>
      </div>
  </div>
</template>

<script>
export default {
    methods:{
        gotonew(){
             this.$router.push("/fillIn")
    },
    gotohis(){
        if(localStorage.getItem==null){
            alert("请生成请假条")
        }else{
            this.$router.push({
            name: "Main",
            params: JSON.parse(localStorage.getItem('data'))
      });
        }
        
    }

}
}
</script>

<style>
.father-button{
width: 300px;
height: 150px;
background-color: #eee;
position: fixed;
top: 20%;
left: 0;
right: 0;
margin:0 auto;
}
.twobutton{
    margin-top: 50px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

</style>